﻿using System;
using System.Data;
using WP.Commons;

namespace WP.IM.DataEntity
{
    [System.ComponentModel.DesignerCategory("Code")]
    public class ImInvMasterDEL : DataSet, IDataEntity
    {
          //=========mCity ============================
        public const string TABLENAME_IminvMaster = "imInvMaster";
        public const string RECID = "RecId";
        public const string ItemNo = "Itemno";
        public const string ItemName = "ItemName";
        public const string SupNo = "SupNo";
        public const string SupName = "SupName";
        public const string ProdWidth = "ProdWidth";
        public const string ProdHeight = "ProdHeight";
        public const string PlanCost = "PlanCost";
        public const string ProdLength = "ProdLength";
        public const string Marketcost = "Marketcost";
        public const string CostUnit = "CostUnit";
        public const string RECSTAMP = "RecStamp";
        public const string PriceFormula = "PriceFormula";
        public const string Remark = "Remark";
        public const string TreatCostUnit="TreatCostUnit";
        public const string TreatCost = "TreatCost";
        public const string MaterialType = "MaterialType";
        public const string MaterialTypeID = "MaterialTypeID";
        public const string GramWeight = "GramWeight";
        public const string PaperHeight = "PaperHeight";
        public const string ClosedStatus = "ClosedStatus";
        public const string SecondMaterialType = "SecondMaterialType";
        public const string SecondMaterialTypeID = "SecondMaterialTypeID";
        public const string FItemID = "FItemID";

        private System.Collections.Specialized.NameValueCollection mVarCollection = new System.Collections.Specialized.NameValueCollection();
        public System.Collections.Specialized.NameValueCollection VarCollection
        {
            get { return mVarCollection; }
            set { mVarCollection = value; }
        }

        public ImInvMasterDEL()
        {
            //Create mCity structure
            CreatemCityStructure();

        }

        //=========mCity============================
        private void CreatemCityStructure()
        {
            DataTable table;
            DataColumnCollection DCC;
            DataColumn DC = new DataColumn();
            table = new DataTable(TABLENAME_IminvMaster);
            DCC = table.Columns;

            DC = new DataColumn(RECID, typeof(System.Int32));
            DCC.Add(DC);

            DC = new DataColumn(FItemID, typeof(System.Int32));
            DCC.Add(DC);

            DC = new DataColumn(ItemNo  , typeof(System.String ));
            DC.DefaultValue ="";
            DCC.Add(DC);

            DC = new DataColumn(ItemName  , typeof(System.String ));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(ProdHeight , typeof(System.Double));
            DC.DefaultValue =0;
            DCC.Add(DC);

            DC = new DataColumn(ProdLength , typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(ProdWidth, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(PlanCost , typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(Marketcost , typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(RECSTAMP, typeof(System.Byte[]));
            DCC.Add(DC);

            DC = new DataColumn(Remark, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(CostUnit , typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(SupNo, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(SupName , typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(PriceFormula, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(MaterialType, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(MaterialTypeID, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(TreatCostUnit, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(SecondMaterialType, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(SecondMaterialTypeID, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(TreatCost, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(GramWeight, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(PaperHeight, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(ClosedStatus, typeof(System.Boolean ));
            DC.DefaultValue = 0;
            DCC.Add(DC);
            
            this.Tables.Add(table);
        }
    }
}
